package com.jun.basic.schedule;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;


@Slf4j
@Component
public class VideoOrderTask {
    @Scheduled(fixedRate = 200000)
    private void sumOrder(){
        log.info("当前交易额={}", Math.random());
    }

    @Scheduled(cron = "0 */10 * * * *")
    private void sumOrder2(){
        log.info("当前交易额2={}", Math.random());
    }
}
